Learn R Programming

units (version 0.4-2)

units<-.numeric: Set measurement units on a numeric vector

Description

Set measurement units on a numeric vector

Usage

"units"(x) <- value

Arguments

x
numeric vector
value
character; unit of measurement string

Value

object of class units

Examples

Run this code
x = 1:3
class(x)
units(x) <- with(ud_units, m/s) # valid
class(x)
y = 2:5

Run the code above in your browser using DataLab